package com.xdb.sqlparser.dialect.oracle.ast.statement;

import com.xdb.sqlparser.ast.SQLExpr;
import com.xdb.sqlparser.ast.SQLName;
import com.xdb.sqlparser.ast.SQLObject;
import com.xdb.sqlparser.dialect.oracle.ast.OracleSQLObjectImpl;
import com.xdb.sqlparser.dialect.oracle.visitor.OracleASTVisitor;

public class OracleAlterIndexStatement extends OracleStatementImpl {

	private SQLName name;

	private SQLName renameTo;

	private boolean compile;

	private Boolean enable;

	private Boolean monitoringUsage;

	private Rebuild rebuild;

	private SQLExpr parallel;

	@Override
	public void accept0(OracleASTVisitor visitor) {
		if (visitor.visit(this)) {
			acceptChild(visitor, name);
			acceptChild(visitor, renameTo);
			acceptChild(visitor, rebuild);
			acceptChild(visitor, parallel);
		}
		visitor.endVisit(this);
	}

	public SQLName getRenameTo() {
		return renameTo;
	}

	public void setRenameTo(SQLName renameTo) {
		this.renameTo = renameTo;
	}

	public SQLExpr getParallel() {
		return parallel;
	}

	public void setParallel(SQLExpr parallel) {
		this.parallel = parallel;
	}

	public Boolean getMonitoringUsage() {
		return monitoringUsage;
	}

	public void setMonitoringUsage(Boolean monitoringUsage) {
		this.monitoringUsage = monitoringUsage;
	}

	public Rebuild getRebuild() {
		return rebuild;
	}

	public void setRebuild(Rebuild rebuild) {
		this.rebuild = rebuild;
	}

	public SQLName getName() {
		return name;
	}

	public void setName(SQLName name) {
		this.name = name;
	}

	public boolean isCompile() {
		return compile;
	}

	public void setCompile(boolean compile) {
		this.compile = compile;
	}

	public Boolean getEnable() {
		return enable;
	}

	public void setEnable(Boolean enable) {
		this.enable = enable;
	}

	public static class Rebuild extends OracleSQLObjectImpl {

		private SQLObject option;

		public SQLObject getOption() {
			return option;
		}

		public void setOption(SQLObject option) {
			this.option = option;
		}

		@Override
		public void accept0(OracleASTVisitor visitor) {
			if (visitor.visit(this)) {
				acceptChild(visitor, option);
			}
			visitor.endVisit(this);
		}

	}
}
